package com.linxiao.hrcrm.domain;

import java.math.BigDecimal;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 余额流水记录对象 crm_balance_flow
 *
 * @author zhoudong
 * @date 2024-01-03
 */
public class CrmBalanceFlow extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 业务类型，退款转余额
     */
    public static final String BUSINESS_TYPE_REFUND = "REFUND";
    /**
     * 业务类型，提现
     */
    public static final String BUSINESS_TYPE_WITHDRAW = "WITHDRAW";
    /**
     * 业务类型，红包
     */
    public static final String BUSINESS_TYPE_REDPACKET = "REDPACKET";
    /**
     * 业务类型，发薪
     */
    public static final String BUSINESS_TYPE_GRANT = "GRANT";
    /**
     * 账户类型，现金余额
     */
    public static final String ACCOUNT_TYPE_BALANCE = "BALANCE";
    /**
     * 账户类型，红包
     */
    public static final String ACCOUNT_TYPE_REDPACKET = "REDPACKET";



    /**
     * 主键
     */
    private Long id;

    /**
     * 客户ID
     */
    @Excel(name = "客户ID")
    private Long customerId;

    /**
     * 商户ID
     */
    @Excel(name = "商户ID")
    private Long mchId;

    /**
     * 业务订单ID
     */
    @Excel(name = "业务订单ID")
    private String businessOrderId;

    /**
     * 业务类型：REFUND-退款转余额;WITHDRAW-提现;REDPACKET-红包
     */
    @Excel(name = "业务类型：REFUND-退款转余额;WITHDRAW-提现;REDPACKET-红包")
    private String businessType;

    /**
     * 账户类型：BALANCE-现金余额、REDPACKET-红包
     */
    @Excel(name = "账户类型：BALANCE-现金余额、REDPACKET-红包")
    private String accountType;

    /**
     * 变更前余额
     */
    @Excel(name = "变更前余额")
    private BigDecimal previousBalance;

    /**
     * 变更后余额
     */
    @Excel(name = "变更后余额")
    private BigDecimal currentBalance;

    /** 客户名称，不保存数据库，仅做展示使用 */
    @Excel(name = "客户名称")
    private String customerName;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setMchId(Long mchId) {
        this.mchId = mchId;
    }

    public Long getMchId() {
        return mchId;
    }

    public void setBusinessOrderId(String businessOrderId) {
        this.businessOrderId = businessOrderId;
    }

    public String getBusinessOrderId() {
        return businessOrderId;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setAccountType(String accountType) {
        this.accountType = accountType;
    }

    public String getAccountType() {
        return accountType;
    }

    public void setPreviousBalance(BigDecimal previousBalance) {
        this.previousBalance = previousBalance;
    }

    public BigDecimal getPreviousBalance() {
        return previousBalance;
    }

    public void setCurrentBalance(BigDecimal currentBalance) {
        this.currentBalance = currentBalance;
    }

    public BigDecimal getCurrentBalance() {
        return currentBalance;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("customerId", getCustomerId())
                .append("mchId", getMchId())
                .append("businessOrderId", getBusinessOrderId())
                .append("businessType", getBusinessType())
                .append("accountType", getAccountType())
                .append("previousBalance", getPreviousBalance())
                .append("currentBalance", getCurrentBalance())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
